// ES2016 and ES2017

// ES2016

const arr = [12,543,543,543,65, NaN, false, "fff"]

console.log(
    arr.includes(NaN),
    arr.includes(false),
    arr.includes("fff")
)

console.log(
    Math.pow(2, 10),
    Math.pow(10, 10)
)


// ES2017

const obj = {
    foo: "rerrwe",
    bar: "bar"
}

console.log(
    Object.values(obj),
    Object.entries(obj)
)

for (const [key, val] of Object.entries(obj)) {
    console.log(key, val)
}

Object.getOwnPropertyDescriptor(obj)

const books = {
    html: 5,
    css: 10,
    js: 1245
}

// String.prototype.padStart / String.prototype.padEnd

for (const [name, count] of Object.entries(books)) {
    console.log(`${name.padEnd(16, "-")}|${count.toString().padStart(3, "0")}`)
}

// 尾逗号
const obj = {
    name: "3213",
    age: 18,
}